class Wife:
    count = 0

    @classmethod
    def count_wife(cls):
        print(cls.count)

    def __init__(self, name):
        self.name = name
        Wife.count += 1


wife01 = Wife('王昭君')
wife02 = Wife('貂蝉')
Wife.count_wife()
